﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

public partial class wptType
{
  public delegate void wptChangedChangedHandler(wptType sender);
  public event wptChangedChangedHandler CategoryChanged;
  public event wptChangedChangedHandler TitleChanged;
  public event wptChangedChangedHandler LocationChanged;

  [XmlIgnore]
  public string Category
  {
    get
    {
      return this.type;
    }
    set
    {
      if (value != this.type)
      {
        this.type = value;

        if (CategoryChanged != null)
        {
          CategoryChanged(this);
        }
      }
    }
  }

  [XmlIgnore]
  public string Title
  {
    get
    {
      return this.name;
    }
    set
    {
      if (value != this.name)
      {
        this.name = value;

        if (TitleChanged != null)
        {
          TitleChanged(this);
        }
      }
    }
  }


  internal void InvokeLocationChanged()
  {
    if (LocationChanged != null)
      LocationChanged(this);
  }
}
